 package Principal;

import javax.swing.JOptionPane;
import java.util.Calendar;
import java.util.Date;


public class Validaciones {
	public static boolean isNum(String strNum) {
	    boolean ret = true;
	    try {

	        Integer.parseInt(strNum);

	    }catch (NumberFormatException e) {
	        ret = false;
	    }
	    return ret;
	}
	public static boolean isDouble(String strDbl){
		boolean ret = true;
		try{
			Double.parseDouble(strDbl);
			}
		catch (NumberFormatException e){
			ret = false;
		}
		return ret;
	}
	public static boolean emailValido (String email){
		boolean bandera=false;
		String EMAIL_REGEX = "^[\\w-_\\.+]*[\\w-_\\.]\\@([\\w]+\\.)+[\\w]+[\\w]$";
		try {
			
			if (email.matches(EMAIL_REGEX)){
				bandera=true;
			}else {
				bandera=false;
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		return bandera;
	}
	
}
